<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function changeImage()
    {
        element=document.getElementById('myimage')
        if(element.src.match('bulbon'))
        {
            element.src="../static/picture/pic_bulboff.gif";
        }
        else
        {
            element.src="../static/picture/pic_bulbon.gif";
        }
    }
</script>
<img id="myimage" onclick="changeImage()" border="0" src="../static/picture/pic_bulbon.gif" width="100" height="180">
<p>点击灯泡开关灯</p>

</body>
</html>